package net.airtheva.hexagonMatrix;

import android.os.Bundle;
import android.app.Activity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

public class MainActivity extends Activity {

	Surface mSurface;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mSurface = new Surface(this);
		setContentView(mSurface);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// TODO Auto-generated method stub
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// TODO Auto-generated method stub
		
		switch(item.getItemId()) {
		case R.id.main_translate:
			mSurface.SetTouchMode(Surface.TOUCH_MODE_TRANSLATE);
			Toast.makeText(this, "TouchMode: Translate.", Toast.LENGTH_SHORT).show();
			break;
		case R.id.main_rotate:
			mSurface.SetTouchMode(Surface.TOUCH_MODE_ROTATE);
			Toast.makeText(this, "TouchMode: Rotate.", Toast.LENGTH_SHORT).show();
			break;
		case R.id.main_scale:
			mSurface.SetTouchMode(Surface.TOUCH_MODE_SCALE);
			Toast.makeText(this, "TouchMode: Scale.", Toast.LENGTH_SHORT).show();
			break;
		}
		
		return super.onOptionsItemSelected(item);
	}

	
	
}
